package com.example.springfeign;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
@RestController
public class SpringFeignApplication {

    @Autowired
    helloService helloService;
    public static void main(String[] args) {
        SpringApplication.run(SpringFeignApplication.class, args);
    }

    @RequestMapping("/getFeign")
    public String getFeign(){
       return helloService.hello();
    }
    @RequestMapping("/getzuul")
    public String getzuul(){
        return helloService.hello()+"getzuul";
    }
}
